# Maintainer: Justin Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 86610 2013-03-20 17:13:35Z eric $

pkgname=perl-data-optlist
pkgver=0.107
pkgrel=1
pkgdesc="parse and validate simple name/value option pairs"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl-params-util' 'perl-scalar-list-utils' 'perl-sub-install>=0.921')
makedepends=('perl-extutils-makemaker>=6.30')
checkdepends=('perl-test-simple')
url=https://metacpan.org/release/Data-OptList
source=("http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-${pkgver}.tar.gz")
md5sums=(17177b3cfb8941780a8736f9b9b30421)
sha512sums=(06d0ca9b2f6142ea4c0de8c6f858bd96fb3964490e50f1caa677e2d53e144a4ce6c89097ad99d390ea86436923a449df8a38bd9064b0b91290b836f084d765f2)
_distdir="${srcdir}/Data-OptList-${pkgver}"

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd "$_distdir"
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd "$_distdir"
    make test
  )
}

package() {
    cd "$_distdir"
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
